package com.jinghao.ctws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.ctws.entity.CwvProduct;
import com.jinghao.ctws.service.ICwvProductService;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/ctws/CwvProduct")
public class CwvProductController extends JingHaoBaseController<CwvProduct> {
	//==================定制内容开始======================
//在这里修改代码
	/**
	 * 收货列表
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listCwvProductBySID",method = RequestMethod.GET) 
	public Map<String, Object> listCwvProductBySID(@ModelAttribute("model") CwvProduct model){
		this.getCwvProductService().listCwvProductBySID(model);
        return model.getListJson();   
	}
	
	/**
	 * 事件列表
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listCwvProductByPalletId",method = RequestMethod.GET) 
	public Map<String, Object> listCwvProductByPalletId(@ModelAttribute("model") CwvProduct model){
		this.getCwvProductService().listCwvProductByPalletId(model);
        return model.getListJson(); 
	}	
	//==================定制内容结束======================

	@Autowired
	public void setCwvProductService(ICwvProductService cwvProductService) {
		super.setIJingHaoBaseService(cwvProductService);
	}

	public ICwvProductService getCwvProductService() {
		return (ICwvProductService) super.getIJingHaoBaseService();
	}
}
